//
//  HMBaseTableViewController.swift
//  sina
//
//  Created by Kent on 16/9/25.
//  Copyright © 2016年 Ming. All rights reserved.
//

import UIKit
import AFNetworking

class HMBaseTableViewController: UITableViewController, HMLoginViewDelegate {
    
    let loginStatus: Bool = HMUserAccountViewModel.sharedAccountViewModel.userLogin 
    
    lazy var loginView: HMLoginView = HMLoginView()
    
    override func loadView() {
        if loginStatus {
            super.loadView()
        } else {
            view = loginView
            loginView.delegate = self
        }
    }

    override func viewDidLoad() {
        super.viewDidLoad()

    }

    func loginClick() {
        let oAuth = HMOAuthViewController()

        let nav = UINavigationController(rootViewController: oAuth)
        
        present(nav, animated: true, completion: nil)
        
    }
    
    func registerClick() {
        print("register click")
    }
}
